<!DOCTYPE html>
<html lang="zh-cmn-Hans">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0,viewport-fit=cover">
		<title>验证码登录</title>
		<link rel="stylesheet" href="../../css/ui.min.css" />
		<link rel="stylesheet" href="../../css/iconfont.css" />
		<link rel="stylesheet" href="../../css/shop.css" />
	</head>
	<style>
		.form-button {
			margin: 40px 0;
		}
		
		.form-row {
			margin-bottom: 25px;
		}
		
		.other-bd .icon-weixindenglu {
			color: #1aac19;
		}
	</style>

	<body ontouchstart>
		<header class="ui-header">
			<a href="javascript:history.go(-1)" class="ui-icon hd-left">
				<span class="iconfont icon-fanhui"></span>
			</a>
			<div class="ui-title">验证码登录</div>
		</header>
		<div class="form-main" id="app">
			<div class="form-inner">
				<div class="form-row">
					<input type="text" class="ui-input" v-model="tel" placeholder="请输入手机号">
				</div>
				<div class="form-row">
					<div class="text">验证码</div>
					<input type="text" class="ui-input" v-model="code" placeholder="请输入验证码">
					<input type="button" class="ui-vcode-btn" value="获取验证码">
				</div>
				<div class="form-button">
					<button class="ui-btn ui-btn-submit" @click="login">完成</button>
				</div>
				<div class="other-box">
					<div class="other-hd"><span>一键登录</span></div>
					<div class="other-bd">
						<a href=""><span class="iconfont icon-weixin"></span></a>
					</div>
				</div>
			</div>
		</div>
		<script src="../../js/jquery-2.1.4.js"></script>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/vue.min.js"></script>
		<script src="../../js/common/config.js"></script>
		
		<script>
			mui.plusReady(function() {
				plus.key.addEventListener('backbutton',
					function() {
						plus.webview.currentWebview().close();
					})
			});
			
			var vm = new Vue({
				el:"#app",
				data:{
					tel:'',
					code:'',
				},
				methods:{
					init(){
						
					},
					login(){
						mui.ajax(Config.api.Login, {
							data: {
								phone_moblie: this.tel,
								password: this.code,
							},
							type: 'post',
							dataType: 'json',
							success: function(data) {
								console.log(JSON.stringify(data));
							},
							error: function(xhr, type, errorThrown) {
								console.log("接口错误");
							}
						})
					}
				}
			});
			vm.init();
		</script>
	</body>

</html>
